<?php
/**
 * @author Amissah Gideon<kuulmek@yahoo.com>
 * @access public
 * @version 1.0
 */
?>

<div class="items-pane" >
   <div class="pane-header">
          <?php  echo __('Edit Repayment') ; ?>
   </div>
   
   <table id="itemsflex" style="display:none;"></table>
   
   <div style="display: none;">
      <div id="items-form-window" style="margin: 20px 5px 5px 5px;">
    	<div class="items-prompt" ></div>
         <?php echo $this->Form->create('SaleCreditPayment', array('default' => false, 'id' => 'items-form', 'action' => 'add','inputDefaults' => array('label' => false,'div' => false)));?>
           <table cellspacing="10">
                <tr>
                    <td><?php  echo __('Amount Tendered GHc:') ;?> </td>
                    <td>
                        <?php echo $this->Form->input('paid_amount', array('type' => 'text', 'div' => false, 'label' => false, 'id'=>'paid_amount' ,'class' => 'validate[required,custom[number]] ', 'value'=>'0.00')); ?>

                    </td>
                </tr>
               <tr>
                   <td><?php  echo __('Date of Payment:') ;?></td>
                   <td>
                       <?php echo $this->Form->input('pay_date', array('type' => 'text', 'readonly' => 'readonly', 'div' => false, 'label' => false, 'id'=>'pay_date' ,'class' => 'validate[required] date-picker', 'value'=>date('Y-m-d'))); ?>
                   </td>
               </tr>
                <tr>
                    <td><?php  echo __('Payment Type:') ;?></td>
                    <td>
                        <?php echo $this->Form->input('pay_type', array('div' => false, 'label' => false, 'id'=>'pay_type' ,'options'=>$pay_type_opt)); ?>
                    </td>
                </tr>
                <tr>
                    <td><?php  echo __('Comments') ;?></td>
				    <td>
                        <?php echo $this->Form->input('comments', array('div' => false, 'label' => false, 'id'=>'comments' ,'class' => '', 'value'=>'')); ?>
                    </td>
                </tr>
                <tr>
                   <td>
                       
                   </td>
                   <td> 
                       <button type="button" class="save" id="items-save-btn"><?php echo $this->Html->image('ico-49.gif', array('width' => '16', 'height' => '16', 'align' => 'left', 'border' => '0')); ?>&nbsp;Save</button>
                       <button type="reset" class="cancel" id="items-cancel-btn"><?php echo $this->Html->image('ico-43.png', array('width' => '16', 'height' => '16', 'align' => 'left', 'border' => '0')); ?>&nbsp;Cancel</button>
                   </td>
                </tr>
            </table>
          <?php echo $this->Form->end();?>
      </div>
    </div>
      
</div>

<!-- Users URL -->
<input type="hidden" id="table-url" value="<?php echo $this->Html->url(array('controller' => 'Sales', 'action' => 'get')); ?>" />
<input type="hidden" id="add-edit-url" value="<?php echo $this->Html->url(array('controller' => 'Sales', 'action' => 'update')); ?>" />
<input type="hidden" id="load-user-url" value="<?php echo $this->Html->url(array('controller' => 'Sales', 'action' => 'load')); ?>" />
<input type="hidden" id="delete-url" value="<?php echo $this->Html->url(array('controller' => 'Sales', 'action' => 'delete_')); ?>" />

<?php
    echo $this->Html->script('custom-scripts/edit_repayment.js',false);
?>